Ext.define('AmpleHarvest.util.utility_status', 
{
    extend			: 'Ext.util.Observable',
	
	constructor	: function(config)
	{
		this.addEvents('responseFailure', 'responseSuccess');
		this.callParent();
	},
	
	getData	: function(str_path, obj_params, obj_jsonData, str_method, obj_passed, obj_headers)
	{
		obj_headers['X-ProxiedEntitiesChain'] = obj_config.user.dn;
		Ext.Ajax.request(
				{
					url		: str_path,
					headers	: obj_headers,
					method	: str_method,
					params	: obj_params,
					timeout	: 200,
					scope	: this,
					success	: function(response)
					{
						if(response.status == '200')
						{
							this.AHcaller.fireEvent('200', response, str_path);
						}
						if(response.status == '500')
						{
							this.AHcaller.fireEvent('500', response, str_path);
						}
					},
					failure	: function(e)
					{
						this.AHcaller.fireEvent('404', e, str_path);
					}
				});
	}
});